package com.fzsf.drawingboard.bean;

import android.graphics.Path;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by Taijl on 2017/12/18.
 */

public class SerializablePath extends Path implements Serializable {

    private ArrayList<float[]> pathPoints = null;

    public SerializablePath() {
        super();
        pathPoints = new ArrayList<>();
    }

    public void addPathPoints(float[] points) {
        this.pathPoints.add(points);
    }

    public void saveMoveTo(float x, float y) {
        super.moveTo(x, y);
        addPathPoints(new float[]{x, y});
    }

    public ArrayList<float[]> getPathPoints() {
        return pathPoints;
    }
}
